﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections;

namespace EZCRS.HCMS.DataAcl
{
    /// <summary>
    /// FGBUserClass 的摘要说明
    /// </summary>
    public class FGBUserClass
    {

        private int _uid;
        private int _gid;
        private string _unumber;
        private int _lvlid;
        private int _endyear;
        private int _scores;
        private string _username;
        private string _usrpassword;
        private string _usremail;
        private byte _emailformat;
        private byte _emaillanguage;
        private string _usrmobile;
        private byte _question;
        private string _answer;
        private string _usrfirstname;
        private string _usrlastname;
        private byte _usrgender;
        private DateTime _usrbirthday;
        private string _usrnationality;
        private string _idtype;
        private string _idno;
        private string _usrcountry;
        private string _usrprovince;
        private string _usrcity;
        private string _smoke;
        private string _bed;
        private string _pillow;
        private DateTime _regdate;
        private DateTime _logdate;
        private string _logip;
        private int _logcount;
        private bool _usrstatus;
        private bool _emailcheck;
        private string _usercheckcode;
        private DateTime _checkcodedate;
        private bool _ademail;
        private bool _admobile;
        private string _email;
        private string _mobnumb;
        private string _cardnumber;
        /// <summary>
        /// 用户ID
        /// </summary>
        public int uid
        {
            get { return _uid; }
            set { _uid = value; }
        }
        /// <summary>
        /// 集团ID
        /// </summary>
        public int gid
        {
            get { return _gid; }
            set { _gid = value; }
        }

        /// <summary>
        /// 用户卡号
        /// </summary>
        public string unumber
        {
            get { return _unumber; }
            set { _unumber = value; }
        }
        /// <summary>
        /// 用户级别
        /// </summary>
        public int lvlid
        {
            get { return _lvlid; }
            set { _lvlid = value; }
        }
        /// <summary>
        /// 到期年份
        /// </summary>
        public int endyear
        {
            get { return _endyear; }
            set { _endyear = value; }
        }
        /// <summary>
        /// 积分总数
        /// </summary>
        public int scores
        {
            get { return _scores; }
            set
            {
                if (value == null)
                {
                    _scores = 0;
                }
                else
                {
                    _scores = value;
                }


            }
        }
        /// <summary>
        /// 用户名
        /// </summary>
        public string username
        {
            get { return _username; }
            set { _username = value; }
        }
        /// <summary>
        /// 用户注册登录Email
        /// </summary>
        public string email
        {
            get { return _email; }
            set { _email = value; }

        }
        /// <summary>
        /// 用户注册登录手机号
        /// </summary>
        public string mobnumb
        {
            get { return _mobnumb; }
            set { _mobnumb = value; }
        }
        /// <summary>
        /// 用户卡号
        /// </summary>
        public string cardnumber
        {
            get { return _cardnumber; }
            set { _cardnumber = value; }
        }



        /// <summary>
        /// 用户密码
        /// </summary>
        public string usrpassword
        {
            get { return _usrpassword; }
            set { _usrpassword = value; }
        }
        /// <summary>
        /// 用户Email
        /// </summary>
        public string usremail
        {
            get { return _usremail; }
            set { _usremail = value; }
        }
        /// <summary>
        /// 邮件格式
        /// </summary>
        public byte  emailformat
        {
            get { return _emailformat; }
            set { _emailformat = value; }
        }
        /// <summary>
        /// 邮件语言选项
        /// </summary>
        public byte emaillanguage
        {
            get { return _emaillanguage; }
            set { _emaillanguage = value; }
        }
        /// <summary>
        /// 用户手机号
        /// </summary>
        public string usrmobile
        {
            get { return _usrmobile; }
            set { _usrmobile = value; }
        }
        /// <summary>
        /// 安全问题
        /// </summary>
        public byte question
        {
            get { return _question; }
            set { _question = value; }
        }
        /// <summary>
        /// 安全问题答案
        /// </summary>
        public string answer
        {
            get { return _answer; }
            set { _answer = value; }
        }
        /// <summary>
        /// 用户名
        /// </summary>
        public string usrfirstname
        {
            get { return _usrfirstname; }
            set { _usrfirstname = value; }
        }
        /// <summary>
        /// 用户姓
        /// </summary>
        public string usrlastname
        {
            get { return _usrlastname; }
            set { _usrlastname = value; }
        }
        /// <summary>
        /// 用户性别
        /// </summary>
        public byte usrgender
        {
            get { return _usrgender; }
            set
            {

                if (value == null)
                {
                    _usrgender = 0;
                }
                else
                {
                    _usrgender = value;
                }
            }
        }
        /// <summary>
        /// 生日
        /// </summary>
        public DateTime usrbirthday
        {
            get { return _usrbirthday.Date; }
            set
            {
                if (value == null)
                {
                    _usrbirthday = DateTime.Today;
                }
                else
                {
                    _usrbirthday = value.Date;
                }
            }

        }
        /// <summary>
        /// 国籍
        /// </summary>
        public string usrnationality
        {
            get { return _usrnationality; }
            set { _usrnationality = value; }
        }
        /// <summary>
        /// 证件类型
        /// </summary>
        public string idtype
        {
            get { return _idtype; }
            set { _idtype = value; }
        }
        /// <summary>
        /// 证件号码
        /// </summary>
        public string idno
        {
            get { return _idno; }
            set { _idno = value; }
        }
        /// <summary>
        /// 用户国家/地区
        /// </summary>
        public string usrcountry
        {
            get { return _usrcountry; }
            set { _usrcountry = value; }
        }
        /// <summary>
        /// 用户省/州
        /// </summary>
        public string usrprovince
        {
            get { return _usrprovince; }
            set { _usrprovince = value; }
        }
        /// <summary>
        /// 用户城市
        /// </summary>
        public string usrcity
        {
            get { return _usrcity; }
            set { _usrcity = value; }
        }
        /// <summary>
        /// 香烟类型
        /// </summary>
        public string smoke
        {
            get { return _smoke; }
            set { _smoke = value; }
        }
        /// <summary>
        /// 喜好床型
        /// </summary>
        public string bed
        {
            get { return _bed; }
            set { _bed = value; }
        }
        /// <summary>
        /// 喜好枕头
        /// </summary>
        public string pillow
        {
            get { return _pillow; }
            set { _pillow = value; }
        }
        /// <summary>
        /// 注册日期
        /// </summary>
        public DateTime regdate
        {
            get { return _regdate; }
            set { _regdate = value; }
        }
        /// <summary>
        /// 最后登录时间
        /// </summary>
        public DateTime logdate
        {
            get { return _logdate; }
            set
            {
                if (value == null)
                {
                    _logdate = DateTime.Now;
                }
                else
                {
                    _logdate = value;
                }
            }
        }
        /// <summary>
        /// 最后登录IP
        /// </summary>
        public string logip
        {
            get { return _logip; }
            set { _logip = value; }
        }
        /// <summary>
        /// 登录次数
        /// </summary>
        public int logcount
        {
            get { return _logcount; }
            set
            {
                if (value == null)
                {
                    _logcount = 0;

                }
                else
                {
                    _logcount = value;
                }

            }
        }
        /// <summary>
        /// 是否已冻结
        /// </summary>
        public bool usrstatus
        {
            get { return _usrstatus; }
            set
            {
                if (value == null)
                {
                    _usrstatus = false;
                }
                else
                {
                    _usrstatus = value;
                }
            }
        }
        /// <summary>
        /// 是否通过邮箱认证
        /// </summary>
        public bool emailcheck
        {
            get { return _emailcheck; }
            set
            {
                if (value == null)
                {
                    _emailcheck = false;
                }
                else
                {
                    _emailcheck = value;
                }
            }
        }
        /// <summary>
        /// 用户校验码
        /// </summary>
        public string usercheckcode
        {
            get { return _usercheckcode; }
            set { _usercheckcode = value; }
        }
        /// <summary>
        /// 是否接受邮件广告
        /// </summary>
        public bool ademail
        {
            get { return _ademail; }
            set
            {
                if (value == null)
                {
                    _ademail = false;
                }
                else
                {
                    _ademail = value;
                }
            }
        }
        /// <summary>
        /// 是否接受短信广告
        /// </summary>
        public bool admobile
        {
            get { return _admobile; }
            set
            {
                if (value == null)
                {
                    _admobile = false;
                }
                else
                {
                    _admobile = value;
                }
            }
        }
        /// <summary>
        /// 用户校验码生成日期
        /// </summary>
        public DateTime checkcodedate
        {
            get { return _checkcodedate; }
            set
            {
                if (value == null)
                {
                    _checkcodedate = System.DateTime.Now;
                }
                else
                {
                    _checkcodedate = value;
                }
            }
        }
        private ArrayList _FGBuserAddress;


        public int Add(FGBUserAddress FGBuserAddress)
        {
            return _FGBuserAddress.Add(FGBuserAddress);
        }
        public FGBUserAddress this[int index]
        {
            get { return _FGBuserAddress[index] as FGBUserAddress; }
            set { _FGBuserAddress[index] = value; }
        }

        public void CopyTo(System.Array array, int index)
        {
            _FGBuserAddress.CopyTo(array, index);
        }

        public bool IsSynchronized
        {
            get { return _FGBuserAddress.IsSynchronized; }
        }

        public object SyncRoot
        {
            get { return _FGBuserAddress.SyncRoot; }
        }

        public IEnumerator GetEnumerator()
        {
            return _FGBuserAddress.GetEnumerator();
        }

        public int Count
        {
            get { return _FGBuserAddress.Count; }
        }

        public FGBUserClass()
        {
            //
            // TODO: 在此处添加构造函数逻辑
            //
            _FGBuserAddress = new ArrayList();
        }
    }

    public class FGBUserAddress
    {
        private int _adrid;
        private int _uid;
        private string _adrtopics;
        private string _usrcountry;
        private string _usrprovince;
        private string _usrcity;
        private string _adrcomment;
        private string _adrpost;
        private string _adrtel;
        private string _adrfax;
        private string _adrcontact;
        /// <summary>
        /// 地址序号
        /// </summary>
        public int adrid
        {
            get { return _adrid; }
            set { _adrid = value; }
        }
        /// <summary>
        /// 用户ID
        /// </summary>
        public int uid
        {
            get { return _uid; }
            set { _uid = value; }
        }
        /// <summary>
        /// 地址描述(公司地址，家庭地址)
        /// </summary>
        public string adrtopics
        {
            get { return _adrtopics; }
            set { _adrtopics = value; }
        }
        /// <summary>
        /// 所在国家
        /// </summary>
        public string usrcountry
        {
            get { return _usrcountry; }
            set { _usrcountry = value; }
        }
        /// <summary>
        /// 所在省份
        /// </summary>
        public string usrprovince
        {
            get { return _usrprovince; }
            set { _usrprovince = value; }
        }
        /// <summary>
        /// 所在城市
        /// </summary>
        public string usrcity
        {
            get { return _usrcity; }
            set { _usrcity = value; }
        }
        /// <summary>
        /// 地址
        /// </summary>
        public string adrcomment
        {
            get { return _adrcomment; }
            set { _adrcomment = value; }
        }
        /// <summary>
        /// 邮政编码
        /// </summary>
        public string adrpost
        {
            get { return _adrpost; }
            set { _adrpost = value; }
        }
        /// <summary>
        /// 联系电话
        /// </summary>
        public string adrtel
        {
            get { return _adrtel; }
            set { _adrtel = value; }
        }
        /// <summary>
        /// 联系传真
        /// </summary>
        public string adrfax
        {
            get { return _adrfax; }
            set { _adrfax = value; }
        }
        /// <summary>
        /// 联系人
        /// </summary>
        public string adrcontact
        {
            get { return _adrcontact; }
            set { _adrcontact = value; }
        }
       
        public FGBUserAddress()
        {
        }
    }
}
